package com.atguigu.edu.realtime.util;

import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * @author Lec
 * @date 2022/8/30 14:25
 */

public class ThreadPoolUtil {
    private static ThreadPoolExecutor threadPoolExecutor = null;
    static {
        threadPoolExecutor = new ThreadPoolExecutor(5, 20, 5 * 60L, TimeUnit.SECONDS,new LinkedBlockingDeque<Runnable>());
    }

    public static ThreadPoolExecutor getThreadPoolExecutor(){
        return threadPoolExecutor;
    }

}
